package cc.mrbird.assets.service;

import cc.mrbird.assets.domain.AssetType;
import cc.mrbird.assets.domain.Park;
import cc.mrbird.common.domain.QueryRequest;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

@CacheConfig(cacheNames = "ParkService")
public interface ParkService {
    List<Park> findAllList(Park park, QueryRequest request);

    Park findByName(String park_name);

    @CacheEvict(allEntries = true)
    void add(Park park);

    @CacheEvict(key = "#p0", allEntries = true)
    void update(Park park);

    @CacheEvict(key = "#p0", allEntries = true)
    void delete(String ids);

    @Cacheable(key = "#p0")
    public Park findById(Long id);
}
